package com.cuikaipeng.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.cuikaipeng.entity.Plant;
import com.cuikaipeng.entity.PlantType;

public interface PlantDao {
	List<Plant> list(Plant plant);
	@Insert("INSERT INTO plant VALUES(null,#{name},#{describes},#{type})")
	void add(Plant p);
	@Select("select * from PlantType")
	List<PlantType> tlist();
	@Select("select * from plant where id=#{id}")
	Plant getplant(@Param("id")Integer id);
	
	void update(Plant p);
	@Delete("delete from plant where id in #{ids}")
	void del(@Param("ids")String ids);
}
